package spring.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Controller
@RequestMapping("/both")
public class BothPathController {

    @ResponseBody
    @RequestMapping(value = "/path", method = RequestMethod.GET)
    public String test(HttpServletRequest req, HttpServletResponse response) throws IOException {
        return "/both/path";
    }
}
